<template>
  <div @click="playGame(item.play_url)" class="item">
    <img class="item__image" :src="item.fine_image">
    <div class="item__inner">
      <img class="item__icon" :src="item.icon">
      <div class="item__info">
        <p class="item__head">
          <strong class="item__title">{{item.gamename}}</strong>
          <span v-for="(tag, index) in item.category ? item.category.split(',').slice(0, 2) : []" :key="index" :class="index ? 'tag_libao' : 'tag_dujia'">{{tag}}</span>
        </p>
        <p class="item__body" v-if="item.player && item.player.count">
          <img class="item__player_icon" v-for="(player, index) in item.player.avatar" :src="player" :key="index">
          <span class="item__player_text">有{{item.player.count}}人在玩</span>
        </p>
      </div>
      <button class="item__btn">
        <span class="item__btn_text">去玩</span>
      </button>
    </div>
  </div>
</template>

<script>
export default {
  name: 'columnLargeItem',
  props: {
    item: {
      type: Object
    }
  }
}
</script>

<style scoped lang="scss">
.item {
  background-color: #fff;
  border-radius: 0.12rem;
  box-shadow: 0 0.04rem 0.07rem 0 rgba(0, 0, 0, 0.1);
  display: block;
  margin: 0.2rem 0.15rem;
  overflow: hidden;

  &__image {
    display: block;
    height: 2.33rem;
    width: 100%;
  }

  &__inner {
    align-items: center;
    border-bottom: 1px solid #e8e8e8; /* no */
    display: flex;
    height: 0.92rem;
    padding: 0.15rem 0;
  }

  &__icon {
    border-radius: 0.1rem;
    height: 0.54rem;
    margin: 0 0.1rem 0 0.15rem;
    width: 0.54rem;
  }

  &__info {
    flex: 1;
  }

  &__head {
    align-items: center;
    display: flex;
  }

  &__body {
    margin-top: 0.1rem;
  }

  &__title {
    color: #333;
    font-size: 0.14rem;
    font-weight: bold;
  }

  &__player {
    margin-top: 0.1rem;

    &_icon {
      border-radius: 50%;
      height: 0.2rem;
      margin-right: 0.04rem;
      width: 0.2rem;
    }

    &_text {
      color: #8b8b8b;
      font-size: 0.13rem;
      margin-left: 0.04rem;
    }
  }

  &__btn {
    background-color: #1C9DE1;
    border-radius: 0.16rem;
    color: #fff;
    font-size: 0.12rem;
    font-weight: bold;
    height: 0.31rem;
    line-height: 0.31rem;
    margin-right: 0.15rem;
    padding: 0 0.18rem;
    position: relative;

    &::after {
      background-color: #1C9DE1;
      border-radius: 0.14rem;
      content: '';
      filter: blur(0.05rem);
      height: 0.28rem;
      left: 0.02rem;
      position: absolute;
      top: 0.03rem;
      width: 0.56rem;
    }

    &_text {
      position: relative;
      z-index: 1;
    }
  }
}
</style>
